home *** CD-ROM | disk | FTP | other *** search
/ How Would You Survive? / How Would You Survive (1995)(Grolier)[Mac-PC].iso / pc / vikingw.dir / 01652_Script_Merchants < prev    next >
Text File  |  1995-09-12  |  2KB  |  76 lines

  1. global gbeenclicked, gQuest
  2.  
  3. on VMarketRollovers
  4.   set gbeenclicked = 0
  5.   if (not(CheckClickedStatus(gQuest))) then
  6.     if rollover(6) then
  7.       Arrowcursor
  8.       repeat while rollover(6)
  9.         set the locH of sprite 14 to 479
  10.         set the locV of sprite 14 to 332
  11.         updatestage
  12.       end repeat
  13.       set the locH of sprite 14 to 999
  14.       updatestage
  15.     else
  16.       if rollover(7) then
  17.         VikingCursor
  18.         repeat while rollover(7)
  19.           if (the mousedown) then
  20.             set gbeenclicked = 1
  21.           else
  22.             --                    the mouse is up
  23.             if gbeenclicked = 1 then
  24.               MerchantsBuying
  25.             end if
  26.           end if
  27.         end repeat
  28.       else
  29.         if rollover(41) then
  30.           HandCursor
  31.         else
  32.           if rollover(42) then
  33.             HandCursor
  34.           else
  35.             ArrowCursor
  36.           end if
  37.         end if
  38.       end if
  39.     end if
  40.   end if
  41.   RandomQuestion(gQuest)
  42. end
  43.  
  44. on MerchantsBuying
  45.   ArrowCursor
  46.   set RunThruCount = 0
  47.   set gCast1 = the castNum of sprite 8
  48.   set gCast2 = the castNum of sprite 9
  49.   puppetsprite 8, true
  50.   puppetsprite 9, true
  51.   repeat while RunThruCount < 3 and (the MouseUp)
  52.     puppetsound "SV300300.AIF"
  53.     set count = 0
  54.     set the castNum of sprite 8 = gCast1 + 1
  55.     updatestage
  56.     wait .8
  57.     set the castNum of sprite 9 = gCast2 + 1
  58.     updatestage
  59.     wait .2
  60.     set the castNum of sprite 8 = gCast1
  61.     updatestage
  62.     wait .2
  63.     set the castNum of sprite 9 = gCast2
  64.     updatestage
  65.     wait .8
  66.     set RunThruCount = RunThruCount + 1
  67.   end repeat
  68.   set the castNum of sprite 8 = gCast1
  69.   set the castNum of sprite 9 = gCast2
  70.   updatestage
  71.   sound fadeOut 1, 3*60
  72.   puppetsprite 8, false
  73.   puppetsprite 9, false
  74.   set gbeenclicked = 0
  75. end
  76.